package com.lagou.mapper;

import com.lagou.pojo.Roles;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author srh
 * @date 2020/02/26
 **/
public interface RolesMapper {

    /**
     * 根据uid获取
     *
     * @param uid
     * @return
     */
    @Select("select * from roles r left join user_roles ur on r.id = ur.role_id AND ur.user_id = #{uid}")
    List<Roles> findByUid(Long uid);

}
